app.service('yinhuanluru',function () {
    var data = {};
    this.setData = function (newData) {
        data = newData;
    };
    this.getData = function (){
        return data
    }
});



app.controller('renwuxiangqingCtrl',['$scope','$http','$rootScope','serv','yinhuanluru',function ($scope,$http,$rootScope,serv,yinhuanluru) {

    $scope.x = serv.getData();
   // $scope.data = serv.getData();

}]);